cd "$pathdata/Risk"

use Risk_cleaned.dta, clear

label var ln_total_time "Ln [Time taken for study]"

* Demographics	

eststo clear
eststo: reg cognitive_uncertainty female age ln_total_time raven_score college if treatment==0, cl(id)
eststo: reg cognitive_uncertainty female age ln_total_time raven_score college extremity_task if treatment==0, cl(id)

preserve
use $pathdata/Beliefs/Beliefs_cleaned.dta, clear
eststo: reg cognitive_uncertainty female age ln_total_time raven_score college if treatment==0, cl(id)
eststo: reg cognitive_uncertainty female age ln_total_time raven_score college extremity_task if treatment==0, cl(id)
restore

preserve
use $pathdata/Survey_beliefs/Survey_cleaned_final.dta, clear
eststo: reg cognitive_uncertainty female age ln_total_time raven_score college, cl(id)
eststo: reg cognitive_uncertainty female age ln_total_time raven_score college extremity_task, cl(id)
restore



** Regression CU split

eststo clear
eststo: reg ce lottery_probability inter_cu_prob cognitive_uncertainty if treatment==0, cl(id)
eststo: reg ce lottery_probability inter_cu_prob cognitive_uncertainty $controls if treatment==0, cl(id)
eststo: reg ce lottery_probability cognitive_uncertainty if treatment==0 & lottery_probability<50, cl(id)
eststo: reg ce lottery_probability cognitive_uncertainty $controls if treatment==0 & lottery_probability<50, cl(id)
eststo: reg ce lottery_probability cognitive_uncertainty if treatment==0 & lottery_probability>=50, cl(id)
eststo: reg ce lottery_probability cognitive_uncertainty $controls if treatment==0 & lottery_probability>=50, cl(id)



* Regression treatment comparison

eststo clear
eststo: reg ce lottery_probability inter_treat_prob treatment if round>6, cl(id)
eststo: reg ce lottery_probability inter_treat_prob treatment $controls if round>6, cl(id)
eststo: reg ce lottery_probability inter_treat_prob treatment inter_cu_prob cognitive_uncertainty if round>6, cl(id)
eststo: reg ce lottery_probability inter_treat_prob treatment inter_cu_prob cognitive_uncertainty $controls if round>6, cl(id)

* Default Manipulation Table

** Prolfiic data
cd $pathdata
use "Risk/Risk_Default_Manipulation_cleaned.dta", clear

eststo clear
eststo: reg ce low_default, cl(id)
eststo: reg ce low_default inter_cu_default cognitive_uncertainty, cl(id)
eststo: reg ce low_default inter_cu_default cognitive_uncertainty $controls, cl(id)


use $pathdata/Beliefs/Beliefs_Default_Manipulation_cleaned.dta, clear

eststo: reg belief low_default, cl(id)
eststo: reg belief low_default inter_cu_default cognitive_uncertainty, cl(id)
eststo: reg belief low_default inter_cu_default cognitive_uncertainty $controls, cl(id)

** Mturk data

cd ../..
cd Mturk/data/Risk
use Risk_cleaned.dta, clear
keep if outlier == 0

label var low_default "1 if \textit{Low Default}"

eststo: reg abs_ce low_default if gains==1, cl(id)
eststo: reg abs_ce low_default inter_cu_default cognitive_uncertainty if gains==1, cl(id)
eststo: reg abs_ce low_default inter_cu_default cognitive_uncertainty $controls if gains==1 & outlier == 0, cl(id)


cd ../Beliefs
use Beliefs_cleaned.dta, clear
keep if outlier == 0

eststo: reg belief low_default if default_set==1, cl(id)
eststo: reg belief low_default inter_cu_default cognitive_uncertainty if default_set==1, cl(id)
eststo: reg belief low_default inter_cu_default cognitive_uncertainty $controls if default_set==1 & outlier == 0, cl(id)


